package com.heima.user;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;


@SpringBootApplication
@EnableDiscoveryClient
@MapperScan("com.heima.user.mapper")
public class UserApplication {
    public static void main(String[] args) {

        /**
         * UserApplication.class 没有正确传入（错误传入了SpringBootApplication.class），导致如下报错
         * Unable to start web server;nested exception is org.springframework.context.
         * ApplicationContextException: Unable to start
         * ServletWebServerApplicationContext due to
         * missing ServletWebServerFactory bean.
         */
        SpringApplication.run(UserApplication.class,args);
    }
}
